package com.yuyou.fn.educational.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.educational.entity.CourseOrderDiscount;
import com.yuyou.fn.educational.vo.CourseOrderDiscountQueryVo;
import com.yuyou.fn.educational.vo.DiscountCodeUseDetailVo;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.util.List;

/**
 *
 * CourseOrderDiscount 表数据服务层接口
 *
 */
public interface ICourseOrderDiscountService extends ISuperService<CourseOrderDiscount,Long> {


    List<CourseOrderDiscount> findByCourseOrderIds(List<Long> courseOrderIds);

    List<CourseOrderDiscount> findByCourseOrderIdsDiscountId(List<Long> courseOrderIds,Long discountId);

    List<CourseOrderDiscount> findByCourseOrderId(Long courseOrderId,Integer from );

    void deleteByCourseOrderId(Long courseOrderId);

    CourseOrderDiscount findByCourseOrderIdAndDiscountId(Long courseOrderId, Long discountId);

    Page<DiscountCodeUseDetailVo> findDiscountCodeUseDetail(CourseOrderDiscountQueryVo courseOrderDiscountQueryVo,int pageNo,int pageSize);

    SXSSFWorkbook exportDiscountCodeUseDetail(CourseOrderDiscountQueryVo courseOrderDiscountQueryVo);
}